# Contributor: Matthias Ahouansou <matthias@ahouansou.cz>
# Maintainer: Matthias Ahouansou <matthias@ahouansou.cz>
pkgname=rlottie
pkgver=0.2_git20230831
_gitrev=d40008707addacb636ff435236d31c694ce2b6cf
pkgrel=0
pkgdesc="A platform independent standalone library that plays Lottie Animation"
url="https://github.com/Samsung/rlottie"
arch="all"
license="MIT AND BSD-3-Clause AND MPL-2.0"
makedepends="ninja meson"
subpackages="$pkgname-dev $pkgname-doc"
source="$pkgname-$pkgver.tar.gz::https://github.com/Samsung/rlottie/archive/$_gitrev.tar.gz"
builddir="$srcdir/$pkgname-$_gitrev"

build() {
	meson --prefix /usr build

	ninja -C build
}

check() {
	ninja -C build test
}

package() {
	DESTDIR="$pkgdir" ninja -C build install

	install -Dm 644 "COPYING" "$pkgdir/usr/share/licenses/$pkgname/COPYING"
	for f in licenses/*
	do
		install -Dm 644 "$f" "$pkgdir/usr/share/licenses/$pkgname/$f"
	done
}

sha512sums="
025456a20d25e015612e871b50cd85b6fb1bbfdf9a2122f0789fafcfe7f85594dc50838088fadbb3f7cdcd86e61061def6a94407f9e0fc4359533a460d8ac427  rlottie-0.2_git20230831.tar.gz
"
